package com.ck.ips.service.impl.program;

import com.ck.common.model.ProgramAddedLog;
import com.ck.ips.dao.program.ProgramAddedLogMapper;
import com.ck.ips.model.vo.program.ProgramPlayListVO;
import com.ck.ips.service.program.ProgramAddedLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author linqiang
 * @version v1.0
 * @Description 增播日志Service实现类
 * @date 2019-04-29 16:39
 */
@Service(value = "programAddedLogService")
public class ProgramAddedLogServiceImpl implements ProgramAddedLogService {

    @Autowired
    private ProgramAddedLogMapper programAddedLogMapper;

    /**
     * 新增
     *
     * @param record 数据
     * @return 影响行数
     */
    @Override
    public int insert(ProgramAddedLog record) {
        return programAddedLogMapper.insert(record);
    }

    /**
     * 列表查询
     *
     * @param deviceCode 设备序列号
     * @return List
     */
    @Override
    public List<ProgramPlayListVO> list(String deviceCode) {
        return programAddedLogMapper.list(deviceCode);
    }

    /**
     * 获取增播节目版本号
     *
     * @param deviceCode 设备序列号
     * @return List
     */
    @Override
    public List<String> getAddedProgramVersionByDeviceCode(String deviceCode) {
        return programAddedLogMapper.getAddedProgramVersionByDeviceCode(deviceCode);
    }
}
